<h2 class="contentTitle">添加视频分类</h2>
<style type="text/css" media="screen">
.my-uploadify-button {
	background:none;
	border: none;
	text-shadow: none;
	border-radius:0;
}

.uploadify:hover .my-uploadify-button {
	background:none;
	border: none;
}

.fileQueue {
	width: 400px;
	height: 150px;
	overflow: auto;
	border: 1px solid #E5E5E5;
	margin-bottom: 10px;
}
</style>
<div class="pageContent">
	
		<div class="pageFormContent nowrap" layoutH="97">
			<dl id="upload_file">
				<dt>设置上传的分类：</dt>
				<dd>			<dl>
				<input id="testFileInput" type="file" name="video" />

                                <div id="fileQueue" class="fileQueue"></div>
									<input type="image" src="<?php echo base_url('static/');?>/uploadify/img/upload.jpg" onclick="$('#testFileInput').uploadify('upload', '*');"/>
									<input type="image" src="<?php echo base_url('static/');?>/uploadify/img/cancel.jpg" onclick="$('#testFileInput').uploadify('cancel', '*');"/>
                                <div class="divider"></div>
			</dl>
				</dd>
			</dl>
                        <div class="divider"></div>
                        <dl
                                    <dd>
                                    <dl id="upload_file_data">
                                    </dl>
                                    </dd>
                            </dl>
			<div class="divider"></div>
			<p></p>
		</div>
	</form>
	
</div>

<script type="text/javascript">
function dialogAjaxDone(json){
      DWZ.ajaxDone(json);
      if (json.statusCode == DWZ.statusCode.ok){
            if (json.navTabId){
                  navTab.reload(json.forwardUrl, {}, json.navTabId);
            }
      }
}
$(function() {
		$("#testFileInput").uploadify({
                'swf':'<?php echo base_url('static/uploadify/scripts/uploadify.swf');?>',
                'uploader':'<?php echo site_url('admin/video/up_video');?>',
                'formData':{'upfiletype':''},
                'buttonText':'请选择视频文件',
                'fileSizeLimit':'2000000KB',
                'fileTypeDesc':'*.flv;*.mp4;',
                'fileTypeExts':'*.flv;*.mp4;',
		'auto':false,
                'multi':true,
                'debug':false,
                'onUploadSuccess':myUploadifySuccess,
                'onQueueComplete':uploadifyQueueComplete
            });

});

function myUploadifySuccess(file,data,response){
    var data = eval('(' + data + ')');
    prompt(data.name+'的地址为',data.url);
    var datas = '视频名称:'+data.name+'<br />视频地址为:'+data.url+'<br />';
    $("#upload_file_data").append(datas);
}
</script>